import { useState } from "react";

const Chapter2 = (props) => {
    const [time] = useState(() => ({
        year: new Date().getFullYear(),
        month: new Date().getMonth() + 1,
        day: new Date().getDate(),
    }));
    const { title } = props;
    return (
        <div className='wrapper wrapper2'>
            <div className='page-header'>
                <h3>{title}</h3>
            </div>
            <div className='alert alert-info'>
                当前时间为:{time.year}年{time.month}月{time.day}日
            </div>
        </div>
    );
};

export default Chapter2;
